<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<h:panelGrid id="userActivityRecordListPanel" columns="1"
		style="width:100%">
		<p:dataTable var="record"
			value="#{userModel.current.userActivityRecords}" rows="20"
			paginator="true" rowsPerPageTemplate="5,7,10,15,20,30,40,50"
			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">

			<f:facet name="header">
				User Activity records</f:facet>
			<p:column style="width:20px">
				<f:facet name="header">
					<p:commandButton icon="delete" ajax="true" update=":detailForm"
						style="float:left"
						actionListener="#{userController.removeSelectedUserActivityRecordFromCurrent}"></p:commandButton>
				</f:facet>
				<p:selectBooleanCheckbox value="#{record.selected}"></p:selectBooleanCheckbox>
			</p:column>
			<p:column headerText="id">
				<h:outputText value="#{record.id}" />
			</p:column>
			<p:column headerText="Date" sortBy="#{record.recordDate}">
				<h:outputText value="#{record.recordDate}" />
			</p:column>

			<p:column headerText="Type" sortBy="#{record.type.label}">
				<h:outputText value="#{record.type.label}" />
			</p:column>
			<p:column headerText="Comments">
				<h:outputText value="#{record.comments}" />
			</p:column>
		</p:dataTable>
	</h:panelGrid>
</ui:composition>

</html>